home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / program / oxcc1434.zip / DOC / CFAR.TXT < prev    next >
Text File  |  1995-11-12  |  6KB  |  131 lines

  1. CFAR.TXT Version 2
  2.  
  3. A .cff archive is maintained with `cfar' which works in a similar manner
  4. to ar. The notable difference about .cff archives is their ability to hold
  5. multiple libraries and multiply defined symbols. The user can store up to
  6. 4096 libraries for each of 16 library types. A library contains .o files
  7. in a.out or coff format. Symbols may not be multiply defined within one library.
  8. Since .cff filesystems have database characteristics, the entries are
  9. automatically cross indexed in various ways and provide very fast access
  10. to a particular module or symbol. Nothing precludes the user from combining
  11. archival and other data within the same .cff file. .o files are stored
  12. as data chunks within libraries, they have a sibling .x chunk which is a packet
  13. of globally defined symbols in the .o chunk and a sibling .t chunk which
  14. contains the external filetime and origin path. Chunks have very low overhead,
  15. they are allocated in 32 byte increments.
  16.  
  17. Ordinary files may be entered into the archive by using the -F switch. These
  18. files can be stored as normal files or as chunks. Chunks are fixed size and
  19. thus cannot be written past the stored EOF. The archiver records the source
  20. path for each ordinary file so that the -M switch can print commands which
  21. would recreate the archive. Files entered with the -F switch are known as
  22. FILEMODE files.
  23.  
  24. The executable code for `cfar.o' is normally stored in oxlib.cff.
  25.  
  26. Read CFF.TXT to learn more about .cff filesystems.
  27.  
  28. Standard (reserved) symbols in the root directory of a .cff archive.
  29.  
  30.     ArVeR       version number of archive
  31.     SN0         a serial number supplier
  32.     SN1         ditto
  33.     SN2         ditto
  34.  
  35. Standard (reserved) subdirectories within .cff archives:
  36.  
  37.     `/msyms'     cross indexed symbols
  38.     `/ipaths'    cross indexed paths to .o files in libraries
  39.     `/qipaths'   quick access path info
  40.     `/origins'   paths to outside origns of the archived .o files
  41.     `/qorigins'  quick access origin info
  42.     `/fipaths'   internal paths to FILEMODE files    
  43.     `/ltype0'    library types 0
  44.         `/ltype0/lib0'      library 0 type 0
  45.         `/ltype0/lib1'      library 1 type 0
  46.         ...
  47.         `/ltype0/lib4095'   library 4095 type 0
  48.     ...
  49.     `/ltype15'   library types 15
  50.         `/ltype15/lib0'      library 0 type 15
  51.          ...
  52.         `/ltype15/lib4095'   library 4095 type 15
  53.   
  54. Currently, the following library types are in use:
  55.  Type
  56.   0    random collections of modules such as libc.a libm.a etc.
  57.   1    class libraries    (a single class occupies a single .o file)
  58.   2    subsystem libraries (a single subsystem occupies a single .o file)
  59.   3    symbols found in dlls
  60.   4-7  to be defined
  61.   8    source code for the random modules
  62.   9    source code for classes
  63.   10   source code for subsystems
  64.   11   source code for dll substitute functions
  65.   12-15 to be defined
  66.  
  67.  
  68. Usage: cfar [-acdflmrstvxCDFMNS] cfpath [file...]
  69.     Switch -- Meaning
  70.     a         Add file, do not overwrite
  71.     c         Check input files against library for clashes
  72.     d         Delete file
  73.     f         Freshen the archive (replace outdated files)
  74.     l#        Place file in libnum #, min:0 max:4095
  75.     m         Print archive map to stdout
  76.     r         Replace/Add file
  77.     s         `file' is a symbol name not a file name (for extract/delete)
  78.     t#        Set libtype # 0=module, 1=class, 2=subsystem, max:15
  79.     v         Verbose
  80.     x         Extract file
  81.     M         Print to stdout, commands which would recreate the archive
  82.     S         Shrink archive (eliminate unused space)
  83.     D         DLLMODE, symbols and dlls from a dlldef.xxx file
  84.     F         FILEMODE, symbols not saved or checked
  85.     C         If FILEMODE, put file in a chunk
  86.     N         If FILEMODE, give input file a new name (last part of cfpath)
  87.  
  88. Examples:
  89.  
  90.     cfar -rt1l6 oxlib.cff *.o      // enter a bunch of .o files into
  91.                                    // library 6 type 1 (classes)
  92.  
  93.     cfar -dl2S oxlib.cff func.o    // delete func.o from library 2
  94.                                    // type 0 and shrink the archive
  95.     
  96.     cfar -mv oxlib.cff > oxlib.map // print a verbose map of the contents
  97.                                    // oxlib.cff and store it in oxlib.map
  98.  
  99.     cfar -xt2l5s oxlib.cff _main   // extract the module in library 5
  100.                                    // type 2 which defines the symbol
  101.                                    // _main
  102.  
  103.     cfar -al4 oxlib.cff libc.a     // add libc.a to library 4 type 0
  104.  
  105.     cfar -cl4 oxlib.cff libc.a     // check libc.a against the contents
  106.                                    // of library 4 type 0 and print any 
  107.                                    // symbol clashes
  108.  
  109.     cfar -rv oxlib.cff libm.a      // add/replace the contents of libm.a
  110.                                    // to library 0 type 0, verbosely
  111.  
  112.     cfar -Dr oxlib.cff dlldef.w32  // add/replace the symbols for win32 dlls
  113.                                    // into msyms, use libtype=3
  114.  
  115.     cfar -FCa oxlib.cff/lang c.grm // add the ordinary file c.grm to the
  116.                                    // subdirectory /lang and store it as a
  117.                                    // chunk (the subdir will be created if
  118.                                    // it does not exist)
  119.  
  120.     cfar -FNa oxlib.cff/new.c xx.c // add the ordinary file xx.c to the root
  121.                                    // directory and give it a new name, new.c
  122.  
  123.     cfar -Fd oxlib.cff/lang/c.grm  // delete the ordinary file /lang/c.grm
  124.  
  125.     cfar -Fx oxlib.cff/new.c       // extract the ordinary file /new.c
  126.  
  127.     cfar -f oxlib.cff              // freshen all the entries
  128.     
  129.     cfar -M oxlib.cff > oxlib.bat  // print a .bat file which would 
  130.                                    // recreate the archive
  131.